package com.sinux.generality.provider.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sinux.generality.provider.demo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sinux
 * @since 2023-05-06
 */
//@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据手机号查询用户信息
     * @param mobile
     * @return
     */
    @Select("SELECT * FROM user WHERE mobile = #{mobile}")
    User getUserByMobile(@Param("mobile") String mobile);

}
